<?php
namespace app\common\model;
use think\Model;

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/3/6
 * Time: 17:59
 */
class LitestoreNews extends Model {

    public function index_banner()
    {
        if(cache('index_banner')){
            $list = cache('index_banner');
        }else{
            $map['status'] = 'normal';
            $list = $this->where($map)->order('id desc')->select();
            cache('index_banner',$list);
        }
        return $list;
    }
}